Add versioned libboost-dev dependency. (Closes: #1129768, #1129770, #1129773)
authorAnton Gladky <gladk@debian.org>
Tue, 10 Mar 2026 05:04:57 +0000 (06:04 +0100)
committerAnton Gladky <gladk@debian.org>
Tue, 10 Mar 2026 05:04:57 +0000 (06:04 +0100)
Record the exact Boost version used at build time to ensure
compatibility and trigger rebuilds on upgrades.

debian/control
debian/rules

index ed3cc6b77d0d7db5ab46f973826aa172646770b5..f4ef2c1191732fabf0323e5483d22c024534bd7e 100644 (file)
@@ -16,6 +16,7 @@ Build-Depends: dpkg-dev (>= 1.22.5),
                dh-sequence-javahelper,
                libalglib-dev,
                javahelper,
+               libboost-dev,
                libadios2-mpi-c++-dev [amd64 arm64 loong64 mips64el ppc64el riscv64 s390x alpha hurd-amd64 ppc64 sparc64],
                libavcodec-dev,
                libavformat-dev,
@@ -86,6 +87,7 @@ Depends: ${misc:Depends},
          ${shlibs:Depends},
          default-jdk [!hppa !hurd-any],
          default-libmysqlclient-dev,
+         libboost-dev (= ${boost:Version}),
          libavcodec-dev,
          libavformat-dev,
          libavutil-dev,
index 7eff996d604c5e567b4b1bb75acfcb5951e7c327..e3e1ba08edafbaf19936b0a390bb9cda15287b25 100755 (executable)
@@ -169,6 +169,11 @@ execute_after_dh_installdocs-indep:
        find $(CURDIR)/debian/vtk9-doc/ -type f -print0 | xargs -0 sed -i 's/https:\/\/raw\.githubusercontent\.com//g'
        find $(CURDIR)/debian/vtk9-doc/ -type f -print0 | xargs -0 sed -i 's/https:\/\/cdn\.jsdelivr\.net\/npm\/mathjax@2/\/usr\/share\/javascript\/mathjax/g'
 
+# Record the exact Boost version used at build time so that libvtk9-dev
+# pulls in the same version and triggers a rebuild when Boost is upgraded.
+execute_before_dh_gencontrol:
+       echo "boost:Version=$$(dpkg-query -W -f='$${Version}' libboost-dev)" >> debian/libvtk9-dev.substvars
+
 ifeq ($(DEB_HOST_ARCH),sh4)
 override_dh_dwz:
        dh_dwz -X libvtkCommonCore